# Uncomment the lines below you want to change by removing the # in the beginning
# Verify script has credentials

script = File.read("shoot_the_screens.js")
if script.include?("FILL-IN-USERNAME") || script.include?("FILL-IN-PASSWORD")
  puts <<-eos

Make sure to change the following lines:
  var username = "FILL-IN-USERNAME";
  var password = "FILL-IN-PASSWORD";

  eos

  raise "Invalid Script File"
end

# A list of devices you want to take the screenshots from
devices([
  "iPhone 6",
  "iPhone 6 Plus",
  "iPhone 5",
  "iPhone 4s",
  "iPad Air"
])

languages("en-US en-CA en-AU es-ES fr-FR it-IT ja-JP sv-SE pt-BR nl-NL de-DE id-ID ko-KR ru-RU cmn-Hans th-TH cmn-Hant tr-TR en-GB".split(" "))

# Where should the resulting screenshots be stored?
screenshots_path "./screenshots"

# clear_previous_screenshots # remove the '#'' to clear all previously generated screenshots before creating new ones

# JavaScript UIAutomation file
js_file './shoot_the_screens.js'

# The name of the project's scheme
scheme 'WordPress'

# Where is your project (or workspace)? Provide the full path here
project_path '../../WordPress.xcworkspace'

# By default, the latest version should be used automatically. If you want to change it, do it here
# ios_version '8.1'

# Custom Callbacks

# setup_for_device_change do |device| 
#   puts "Preparing device: #{device}"
# end

# setup_for_language_change do |lang, device|
#   puts "Running #{lang} on #{device}"
#   system("./popuplateDatabase.sh")
# end

# teardown_language do |lang, device|
#   puts "Finished with #{lang} on #{device}"
# end

# teardown_device do |device|
#   puts "Cleaning device #{device}"
#   system("./cleanup.sh")
# end
